import { Story, Canvas } from '@storybook/addon-docs';

# Pre Disabled Rows

To pre-disable rows based on your data:

```js
...
const rowDisabledCriteria = row => row.isOutOfStock;

function MyComponent() {
  return (
    <DataTable
      columns={columns}
      data={data}
      selectableRows
      selectableRowDisabled={rowDisabledCriteria}
    />
  );
}
```

<Canvas>
  <Story id="selectable-pre-disabled--pre-disabled" />
</Canvas>
